package com.zg.nacos.sys;

import com.zg.common.core.exception.IException;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/5/21 16:40
 */

public enum MicroE implements IException {

    MICRO_IS_ACTIVE(00001, "服务已运行，不能操作"),
    MICRO_IS_EXIST(00002, "同样的服务已经存在");


    private Integer code;
    private String msg;

    MicroE(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        String s =Constants.SYS_CODE + String.format("%05d", this.code);
        return  Integer.valueOf(s);
    }

    @Override
    public String getMsg() {
        return this.msg;
    }
}
